﻿<%@ Page Language="C#" AutoEventWireup="true" %>

<%@ Register Assembly="System.Web.Silverlight" Namespace="System.Web.UI.SilverlightControls"
    TagPrefix="asp" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>HtmlUtilities.UITest</title>
    <style type="text/css">
    html, body {
	    height: 100%;
	    overflow: auto;
    }
    body {
	    padding: 0;
	    margin: 0;
    }
    </style>
   <script type="text/javascript">
    function MyNameIs(name)
    {
        this.Name = "My name is " + name;
    }

    function CreateName(name) {
        return new MyNameIs(name);
    }

    function CreateSLName(first, last) {
        var plugin = document.getElementById("Silverlight1");
        var name = plugin.content.services.createObject("SLName");
        name.First = first;
        name.Last = last;
        return name;
    }

    function GetList(num) {
        var result = new Array()
        for (i = 0; i < num; i++)
            result[i] = "Item" + i;
        return result;
    }

    function GetScriptableObject() {
        var plugin = document.getElementById("Silverlight1");
        return plugin.content.SOTest;
    }
        
   </script>
</head>
<body>
    <form id="form1" runat="server" style="height:100%;">
        <asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
        <div id="slControl" style="height:50%;">
            <asp:Silverlight ID="Silverlight1" runat="server" Source="~/ClientBin/HtmlUtilities.UITest.xap" MinimumVersion="3.0.40307.0" Width="100%" Height="100%" />
        </div>
        <div id="testing" class="MyClass" lang="en">
            DOM Manipulation Here
        </div>
    </form>
</body>
</html>